package com.paradogs.gs.modules.friend;

import com.paradogs.gs.misc.DBMultiRowManager;
import com.paradogs.gs.misc.annotations.GameManager;
import com.paradogs.gs.db.Friend;
import com.paradogs.gs.modules.friend.dao.FriendDao;
import lombok.extern.slf4j.Slf4j;

import java.util.Map;

/**
 * @author: yumi
 * @date: 2024/12/23  14:39
 * @Description: TODO
 */
@Slf4j
@GameManager
public class FriendMgr extends DBMultiRowManager<FriendDao, Friend> {
    @Override
    public void onInitialization(Map<Long, Friend> data) {}

    public boolean hasFriend(Long fid) {
        return __raw__().values().stream().anyMatch(v -> v.getFriendId().equals(fid));
    }



}
